// JavaScript Document
function checkedAll(checked)
{	
	if(checked == true) checked = false;
	else checked = true;
	
	if (checked == false){checked = true}else{checked = false}
	for (var i = 0; i < document.getElementById('frmlist').elements.length; i++) {
		document.getElementById('frmlist').elements[i].checked = checked;
	}
}
function submit_form(frm,action)
{
	frm.action = action;
	frm.submit();
}
function sm_form(frm,action)
{
	frm.action = action;
	frm.submit();
}
function sm_frm(frm,action,strcf)
{ 
	fchk = 1;
	strdo = document.getElementById('sel_action').value;
	
	if(strdo == 'delete')
	{
		if(confirm(strcf) == false){
		  fchk = 0;
		}  
	}
	
	if(fchk == 1){
		frm.action = action;
		frm.submit();
	}  
}
function sm_report(frm,action)
{
	frm.action = action;
	frm.target="_self";
	frm.submit();
}
function sm_print(frm,action)
{
	frm.action = action;
	frm.target="_blank";
	frm.submit();
}
function print_open(action)
{
	window.open(action);
}
function close_popup()
{
	window.opener.location.reload();
	window.close();
}
function confirmDelete(msg,url)
{
	if (confirm(msg)) {
		document.location = url;
	}
}
function set_default_focus(id_ele)
{
	document.getElementById(id_ele).focus();
}
function toggle_div(id)
{
	var diq = document.getElementById(id).style;
	diq.display=(diq.display=="none") ? "" : "none";
}